package co.com.inventarios.modelo;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Producto entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PRODUCTO", schema = "MANAGER", uniqueConstraints = {})
public class Producto implements java.io.Serializable {

	// Fields

	private String procodigo;
	private Unimed unimed;
	private Tipoiva tipoiva;
	private Vinculado vinculado;
	private Linea linea;
	private String pronombre;
	private String procorto;
	private Long proserie;
	private Long proactivo;
	private Long provence;
	private Timestamp prologfec;
	private Dlluser dlluser;
	private Set<Prounimed> prounimeds = new HashSet<Prounimed>(0);
	private Set<Proserie> proseries = new HashSet<Proserie>(0);
	private Set<Mngmcn> mngmcns = new HashSet<Mngmcn>(0);
	private Set<Probodega> probodegas = new HashSet<Probodega>(0);
	private Set<RequiPro> requiPros = new HashSet<RequiPro>(0);
	private Set<Catvtapro> catvtapros = new HashSet<Catvtapro>(0);

	// Constructors

	/** default constructor */
	public Producto() {
	}

	/** minimal constructor */
	public Producto(String procodigo, Unimed unimed, Tipoiva tipoiva,
			Dlluser dlluser,Timestamp prologfec,
			Vinculado vinculado, Linea linea, Long proserie, Long proactivo,
			Long provence) {
		this.procodigo = procodigo;
		this.prologfec = prologfec;
		this.dlluser = dlluser;
		this.unimed = unimed;
		this.tipoiva = tipoiva;
		this.vinculado = vinculado;
		this.linea = linea;
		this.proserie = proserie;
		this.proactivo = proactivo;
		this.provence = provence;
	}

	/** full constructor */
	public Producto(String procodigo, Unimed unimed, Tipoiva tipoiva,
			Vinculado vinculado, Linea linea, String pronombre,String procorto, Long proserie,
			Long proactivo, Long provence, Set<Prounimed> prounimeds,
			Set<Proserie> proseries, Set<Mngmcn> mngmcns,
			Set<Probodega> probodegas, Set<RequiPro> requiPros,
			Set<Catvtapro> catvtapros) {
		this.procodigo = procodigo;
		this.unimed = unimed;
		this.tipoiva = tipoiva;
		this.vinculado = vinculado;
		this.linea = linea;
		this.pronombre = pronombre;
		this.procorto = procorto;
		this.proserie = proserie;
		this.proactivo = proactivo;
		this.provence = provence;
		this.prounimeds = prounimeds;
		this.proseries = proseries;
		this.mngmcns = mngmcns;
		this.probodegas = probodegas;
		this.requiPros = requiPros;
		this.catvtapros = catvtapros;
	}

	// Property accessors
	@Id
	@Column(name = "PROCODIGO", unique = true, nullable = false, insertable = true, updatable = true, length = 15)
	public String getProcodigo() {
		return this.procodigo;
	}

	public void setProcodigo(String procodigo) {
		this.procodigo = procodigo;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PROUNIMED", unique = false, nullable = false, insertable = true, updatable = true)
	public Unimed getUnimed() {
		return this.unimed;
	}

	public void setUnimed(Unimed unimed) {
		this.unimed = unimed;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PROIVATIPO", unique = false, nullable = false, insertable = true, updatable = true)
	public Tipoiva getTipoiva() {
		return this.tipoiva;
	}

	public void setTipoiva(Tipoiva tipoiva) {
		this.tipoiva = tipoiva;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PROPROVEE", unique = false, nullable = false, insertable = true, updatable = true)
	public Vinculado getVinculado() {
		return this.vinculado;
	}

	public void setVinculado(Vinculado vinculado) {
		this.vinculado = vinculado;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PROLINEA", unique = false, nullable = false, insertable = true, updatable = true)
	public Linea getLinea() {
		return this.linea;
	}

	public void setLinea(Linea linea) {
		this.linea = linea;
	}

	@Column(name = "PRONOMBRE", unique = false, nullable = true, insertable = true, updatable = true, length = 100)
	public String getPronombre() {
		return this.pronombre;
	}

	
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PROLOGUSER", unique = false, nullable = true, insertable = true, updatable = true)
	public Dlluser getDlluser() {
		return this.dlluser;
	}

	public void setDlluser(Dlluser dlluser) {
		this.dlluser = dlluser;
	}

	@Column(name = "PROLOGFEC", unique = false, nullable = true, insertable = true, updatable = true)
	public Timestamp getPrologfec() {
		return this.prologfec;
	}

	public void setPrologfec(Timestamp prologfec) {
		this.prologfec = prologfec;
	}
	
	@Column(name = "PROCORTO", unique = false, nullable = true, insertable = true, updatable = true, length = 20)
	public String getProcorto() {
		return this.procorto;
	}
	
	public void setPronombre(String pronombre) {
		this.pronombre = pronombre;
	}

	public void setProcorto(String procorto) {
		this.procorto = procorto;
	}
	
	@Column(name = "PROSERIE", unique = false, nullable = false, insertable = true, updatable = true, precision = 22, scale = 0)
	public Long getProserie() {
		return this.proserie;
	}

	public void setProserie(Long proserie) {
		this.proserie = proserie;
	}

	@Column(name = "PROACTIVO", unique = false, nullable = false, insertable = true, updatable = true, precision = 22, scale = 0)
	public Long getProactivo() {
		return this.proactivo;
	}

	public void setProactivo(Long proactivo) {
		this.proactivo = proactivo;
	}

	@Column(name = "PROVENCE", unique = false, nullable = false, insertable = true, updatable = true, precision = 22, scale = 0)
	public Long getProvence() {
		return this.provence;
	}

	public void setProvence(Long provence) {
		this.provence = provence;
	}

	@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "producto")
	public Set<Prounimed> getProunimeds() {
		return this.prounimeds;
	}

	public void setProunimeds(Set<Prounimed> prounimeds) {
		this.prounimeds = prounimeds;
	}

	@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "producto")
	public Set<Proserie> getProseries() {
		return this.proseries;
	}

	public void setProseries(Set<Proserie> proseries) {
		this.proseries = proseries;
	}

	@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "producto")
	public Set<Mngmcn> getMngmcns() {
		return this.mngmcns;
	}

	public void setMngmcns(Set<Mngmcn> mngmcns) {
		this.mngmcns = mngmcns;
	}

	@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "producto")
	public Set<Probodega> getProbodegas() {
		return this.probodegas;
	}

	public void setProbodegas(Set<Probodega> probodegas) {
		this.probodegas = probodegas;
	}

	@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "producto")
	public Set<RequiPro> getRequiPros() {
		return this.requiPros;
	}

	public void setRequiPros(Set<RequiPro> requiPros) {
		this.requiPros = requiPros;
	}

	@OneToMany(cascade = {}, fetch = FetchType.LAZY, mappedBy = "producto")
	public Set<Catvtapro> getCatvtapros() {
		return this.catvtapros;
	}

	public void setCatvtapros(Set<Catvtapro> catvtapros) {
		this.catvtapros = catvtapros;
	}

}